<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;


/**
 * App\Models\ShopEvaluate
 *
 * @property int $id
 * @property int $uid
 * @property int $shop_id
 * @property int|null $order_id
 * @property int $stars
 * @property string|null $message
 * @property int $created_at
 * @property int $product_score
 * @property int $wuliu_score
 * @property int $service_score
 * @property-read \App\Models\Order|null $order
 * @property-read \App\Models\Shop $shop
 * @property-read \App\Models\User $user
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShopEvaluate newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShopEvaluate newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShopEvaluate query()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShopEvaluate whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShopEvaluate whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShopEvaluate whereMessage($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShopEvaluate whereOrderId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShopEvaluate whereProductScore($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShopEvaluate whereServiceScore($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShopEvaluate whereShopId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShopEvaluate whereStars($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShopEvaluate whereUid($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShopEvaluate whereWuliuScore($value)
 * @mixin \Eloquent
 */
class ShopEvaluate extends Model
{
    protected $table = 'shop_evaluate';
    protected $primaryKey = 'id';

    public $timestamps = false;

    /**
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function shop()
    {
        return $this->belongsTo(Shop::class, 'shop_id', 'shop_id');
    }

    /**
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function order()
    {
        return $this->belongsTo(Order::class, 'order_id', 'order_id');
    }

    /**
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function user()
    {
        return $this->belongsTo(User::class, 'uid', 'uid');
    }
}
